<template>
  <div>
      <!-- <navs></navs> -->
    <div class="Showmx-wrap">
      <div class="wrap-card" v-for="(item, index) in getdatas" @click="detailtab(item.ids)":key='index' v-show="datashows">
        <div>
          <el-image :src="item.haibao" lazy v-if></el-image>
        </div>
        <!-- <img src="../../assets/notLogin.jpg" alt="" v-else-if> -->
        <div class="title-wrap">
          <p>{{ item.title1 }}</p>
          <p>{{ item.timer }}</p>
          <p>场馆：{{ item.weizhi }}</p>
          <p>{{ item.price }}</p>
        </div>
        <span class="wrap-card-buys">购票</span>
      </div>
      <div v-show="!datashows" class="kong-wrap">
          <img src="../../../assets/kong_icon.svg" alt="">
          <span>呀！这里什么也没有搜索到呢</span>
      </div>
    </div>
  </div>
</template>

<script>
// import navs from '../yshowNav.vue'
export default {
  data() {
    return {
      datashows:true,
      getdatas: [],
    };
  },
  // components: {navs},
  computed: {},
  created() {
    // console.log();
    let title1 = this.$route.query.datas
    console.log(title1);
    this.searchs(title1)
  },
  methods: {
    async searchs(title1) {
      let yanchugets = await this.$http.post('/yanchuSearch',{
          title1:title1
      })
      if(yanchugets.data.data.length == 0){
          this.datashows = false
      }else{
          this.datashows = true 
      }
      this.getdatas = yanchugets.data.data;
    },
     detailtab(ids){
      console.log(ids);
      let url = this.$router.resolve({path:'/Yshow/detail',query:{ids:ids}})
      window.open(url.href,'_black')
    }
  },
};
</script>

<style lang="scss" scoped>
.Showmx-wrap {
  box-sizing: border-box;
  width: 990px;
  min-height: 600px;
  margin: 20px auto;
  background: rgb(255, 255, 255);
  padding: 30px 40px;
  .kong-wrap{
      display: flex;
      flex-direction: column;
      margin-top: 100px;
      width: 100%;
      height: 500px;
      justify-content: center;
      align-items: center;
      >span{
          color: rgb(172, 172, 172);
          font-size: 30px;
      }
  }
  .kong-wrap img{
      width: 400px;
  }
  .pages-fen {
    padding-top: 30px;
    width: 100%;
    text-align: center;
  }
  .wrap-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 238px;
    border-bottom: 1px solid rgb(218, 214, 214);
    >div{
      width: 148px;
      height: 207px;
       el-image{
      width: 148px;
      height: 207px;
    }
    }
    
    .title-wrap {
      width: 590px;
      /* margin-right:40px ; */
      p {
        margin: 25px 0;
      }
      p:nth-child(1) {
        font-size: 20px;
        font-weight: bold;
      }
      p:nth-child(2) {
        font-size: 15px;
        color: rgb(124, 120, 120);
      }
      p:nth-child(3) {
        font-size: 15px;
        color: rgb(124, 120, 120);
      }
      p:nth-child(4) {
        font-size: 22px;
        color: rgb(236, 42, 42);
      }
    }
    .wrap-card-buys {
      padding: 15px 40px;
      background: orangered;
      border-radius: 10px;
      color: #fff;
      font-weight: bold;
    }
  }
}
</style>
